<!DOCTYPE html>
<html>
  <head>
    <title>Edit Product</title>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
  </head>
  <body onload="initializePage()">
    <nav class="navbar navbar-expand-sm bg-dark navbar-dark">
      <ul class="navbar-nav">
        <li class="nav-item">
          <a id="navEditProduct" class="nav-link" href="#EditProduct" onclick="switchForm(true)">Edit Product</a>
        </li>
        <li class="nav-item">
          <a id="navPlaceOrder" class="nav-link" href="#PlaceOrder" onclick="switchForm(false);">Place Order</a>
        </li>
      </ul>
    </nav>

    <div class="container">
      <h1 id="formTitle"></h1>

      <div id="errorMessage" class="alert alert-danger" role="alert" style="display:none;">
      </div>

      <div id="productForm" style="display:none;">
        <div class="form-group">
          <label for="name">Name:</label>
          <input type="text" class="form-control" id="name">
        </div>
        <div class="form-group">
          <label for="category">Category:</label>
          <select class="custom-select" id="category">
            <option value="0"></option>
            <option value="100">Jeans</option>
            <option value="101">Dress Pants</option>
          </select>
        </div>
 
        <button type="button" class="btn btn-primary" onclick="onClickSaveProduct()">Save</button>
      </div>

      <div id="orderForm" style="display:none;">
        <div class="form-group">
          <label for="product">Product:</label>
          <select class="custom-select" id="product">
            <option value="0"></option>
            <option value="200">Women's Mid Rise Skinny Jeans</option>
            <option value="301">Men's Relaxed Classic Fit Flat Front Pant</option>
          </select>
        </div>
        <div class="form-group">
          <label for="quantity">Quantity:</label>
          <input type="text" class="form-control" id="quantity" value="0">
        </div>
 
        <button type="button" class="btn btn-primary" onclick="onClickAddToCart()">Add to Cart</button>
      </div>
    </div>

    <script src="index.js"></script>
    <script src="validate_core.js"></script>
  </body>
</html>
